<?php
namespace Resources\Form;

use Zend\InputFilter\InputFilter;

class SpeakerFormFilter extends InputFilter
{

public function __construct()
    {
        
        $this->add(array(
            'name' => 'TITLE',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name'    => 'InArray',
                    'options' => array(
                        'haystack' => array(2,3,4,5,6,7,8,9,10),
                        'messages' => array(
                            'notInArray' => 'Please select a title !'
                        ),
                    ),
                )
        
            )
        ));
               
        $this->add(array(
            'name' => 'FIRST_NAME',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
                
            )
        ));
        
      /*  $this->add(array(
            'name' => 'MIDDLE_NAME',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
        
            )
        ));*/
        
        $this->add(array(
            'name' => 'LAST_NAME',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
        
            )
        ));
        
        $this->add(array(
            'name' => 'GENDER',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name'    => 'InArray',
                    'options' => array(
                        'haystack' => array(1,2,3,4),
                        'messages' => array(
                            'notInArray' => 'Please select a gender !'
                        ),
                    ),
                )
        
            )
        ));
   
        $this->add(array(
            'name' => 'REMARK',
            'filters' => array(
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
        
            )
        ));
        
    }
}